<template>
    <a-modal :title="$t('Delete') + $t('Sender-information')" v-model='isShow' width='38%'
        @ok='handleDelete' @cancel='handleClose' :cancelText="$t('Cancel')" :okText="$t('Sure')" :maskClosable='false' v-dragModal>
        <a-spin :spinning="loading">
            <div class="ml-30 mb-60">
                <span>{{ $t('del_sender_info') }}</span>
            </div>
        </a-spin>
    </a-modal>
</template>

<script>

export default {
    data() {
        return {
            isShow: false,
            loading: false,
            userid: '',
        };
    },
    methods: {
        async handleDelete() {
            console.log("user", this.userid)
            this.loading = true
            const { data } = await this.$api.alarm.delSnmpV3Api({ id: this.userid })
            this.model(data.id) //返回模板
            this.notice(data.id, data.params, data.flag) //通知列表显示
            if (data.flag === 0) {
                this.handleClose()
                this.$emit('get-list');
            } 
            this.loading = false
        },
        handleClose() {
            this.isShow = false
        }
    }

}
</script>
<style scoped>
:deep(.ant-modal-content .ant-modal-footer) {
  		border-top: none !important;
}
</style>